package main;

import java.io.IOException;
import java.net.Socket;

public class ElevatorControl {
	private static String DEFAULT_ADDRESS = "localhost";
	private static int DEFAULT_PORT       = 4711;
	
	public ElevatorControl(String[] args) throws IOException, InterruptedException {
		Socket s = new Socket(DEFAULT_ADDRESS, DEFAULT_PORT);
		Listener listener = new Listener(s);
		Messenger messenger = new Messenger(s);
		
		Thread.sleep(1000);
		messenger.requestPosition(1);
		Thread.sleep(1000);
		messenger.requestPosition(2);
		Thread.sleep(1000);
		messenger.requestPosition(3);
		Thread.sleep(1000);
		messenger.requestPosition(4);
		Thread.sleep(1000);
		messenger.requestPosition(5);
		Thread.sleep(1000);
		messenger.requestPosition(7);
		Thread.sleep(1000);

		
	}

	public static void main(String[] args) throws IOException, InterruptedException{
		new ElevatorControl(args);
	}
}
